require('./PageSchedule.styl');

const reactMixin = require('react-mixin');
const Actions = require('./actions');
const Store = require('./store');
const GirdView = require('components/girdview');
const Panel = require('components/panel');

const ui = require('clientConfig/util/jsapi/ui');
var paths = [{ path: "schedule", title: "进度查看", id: 'index0'}];
class Schedule extends React.Component {

    constructor(props) {
        super(props);
        this.state = {
        };
        this.handlePlusClick = this.handlePlusClick.bind(this);
    }
    handlePlusClick() {
        this.setState({
            show: true,
        })
    }
    render() {
        let girdItems = [ { title: "项目进度", hashPath: "/home/workplan", src: "sponsored", homesvg: "schedule0_svg2" }, { title: "支付进度", hashPath: "/home/payment", src: "copy", homesvg: "schedule0_svg3" }, { title: "维护进度", hashPath: "/home/maintenance", src: "copy", homesvg: "schedule0_svg4" }];
        return (
            <div className="schedule">
                {paths.map((item, index) => {
                    const ContentSvg = require(`images/svg/mangement/${item.path}.svg`);
                    return (
                        <Panel title={item.title} Key={item.path} false >
                            <ContentSvg className="content-svg"/>
                        </Panel>);
                })
                }
                <GirdView girdItems={girdItems} path={paths[0].path} />
            </div>
        );
    }
    componentWillMount() {
        ui.setTitle({ title: "IT项目管理信息系统" });
    }

    componentDidMount() {
    }

    componentWillReceiveProps(nextProps) {
    }

    shouldComponentUpdate(nextProps, nextState) {
        return true;
    }

    componentWillUpdate(nextProps, nextState) {
    }

    componentDidUpdate(prevProps, prevState) {
    }

    componentWillUnmount() {
    }
}

reactMixin.onClass(Schedule, Reflux.connect(Store));

module.exports = Schedule;
